package cn.pomelo.secondskill.model;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

@Data
public class Goods implements Serializable {
    /**
    * 商品id
    */
    private Integer id;

    /**
    * 商品编号
    */
    private String numbering;

    /**
    * 商品名称
    */
    private String name;

    /**
    * 原价
    */
    private BigDecimal oldPrice;

    /**
    * 秒杀价
    */
    private BigDecimal newPrice;

    /**
    * 商品数量
    */
    private Integer quantity;

    /**
    * 销量
    */
    private Integer sales;

    /**
    * 图片地址
    */
    private String image;

    /**
    * 描述
    */
    private String represent;

    /**
    * 创建时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    private Date createDate;

    /**
    * 修改时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    private Date updateDate;

    /**
    * 秒杀到期时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    private Date killDate;

    /**
    * 秒杀开始时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    private Date startDate;

    @Serial
    private static final long serialVersionUID = 1L;
}